]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell: remove ShellProcess
authorDan Winship <danw@gnome.org>
Wed, 17 Nov 2010 16:43:08 +0000 (11:43 -0500)
committerDan Winship <danw@gnome.org>
Thu, 13 Jan 2011 17:14:40 +0000 (12:14 -0500)
ShellProcess only existed to work around gjs bugs that have long since
been fixed, and has now been obsoleted by Util.spawn*. Kill it.

https://bugzilla.gnome.org/show_bug.cgi?id=635089

src/Makefile.am
src/shell-process.c [deleted file]
src/shell-process.h [deleted file]

index fa9804b72e0bd3355bcd013695039c14ad8ca56d..0740f06675184319438f19ebbb5ec779a1a3ae63 100644 (file)
@@ -59,7 +59,6 @@ shell_public_headers_h =              \
        shell-embedded-window.h         \
        shell-generic-container.h       \
        shell-gtk-embed.h               \
-       shell-process.h                 \
        shell-global.h                  \
        shell-perf-log.h                \
        shell-slicer.h                  \
@@ -90,7 +89,6 @@ libgnome_shell_la_SOURCES =           \
        shell-embedded-window.c         \
        shell-generic-container.c       \
        shell-gtk-embed.c               \
-       shell-process.c                 \
        shell-global.c                  \
        shell-perf-log.c                \
        shell-slicer.c                  \
diff --git a/src/shell-process.c b/src/shell-process.c
deleted file mode 100644 (file)
index afa3abd..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-
-#include "config.h"
-
-#include "shell-process.h"
-
-#include <sys/types.h>
-#include <sys/wait.h>
-
-struct _ShellProcessPrivate {
-  char **args;
-  GPid pid;
-};
-
-enum {
-  PROP_0,
-  PROP_ARGS,
-};
-
-static void shell_process_dispose (GObject *object);
-static void shell_process_finalize (GObject *object);
-static void shell_process_set_property ( GObject *object,
-                                        guint property_id,
-                                        const GValue *value,
-                                        GParamSpec *pspec );
-static void shell_process_get_property( GObject *object,
-                                       guint property_id,
-                                       GValue *value,
-                                       GParamSpec *pspec );
-
-G_DEFINE_TYPE( ShellProcess, shell_process, G_TYPE_OBJECT);
-
-static void shell_process_class_init( ShellProcessClass *klass)
-{
-  GObjectClass *gobject_class = (GObjectClass *)klass;
-
-  gobject_class->dispose = shell_process_dispose;
-  gobject_class->finalize = shell_process_finalize;
-  gobject_class->set_property = shell_process_set_property;
-  gobject_class->get_property = shell_process_get_property;
-
-  g_object_class_install_property (gobject_class,
-                                  PROP_ARGS,
-                                  g_param_spec_boxed ("args",
-                                                      "Arguments",
-                                                      "",
-                                                      G_TYPE_STRV,
-                                                      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
-}
-
-static void shell_process_init (ShellProcess *self)
-{
-  self->priv = g_new0 (ShellProcessPrivate, 1);
-}
-
-static void shell_process_dispose (GObject *object)
-{
-  G_OBJECT_CLASS (shell_process_parent_class)->dispose(object);
-}
-
-static void shell_process_finalize (GObject *object)
-{
-  ShellProcess *self = (ShellProcess*)object;
-
-  g_free (self->priv);
-  g_signal_handlers_destroy(object);
-  G_OBJECT_CLASS (shell_process_parent_class)->finalize(object);
-}
-static void shell_process_set_property ( GObject *object,
-                                         guint property_id,
-                                         const GValue *value,
-                                         GParamSpec *pspec ) 
-{
-  ShellProcess* self = SHELL_PROCESS(object);
-  switch (property_id) {
-  case PROP_ARGS:
-    self->priv->args = (char**) g_value_dup_boxed (value);
-    break;
-  default:
-    G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-    break;
-  }
-}
-
-
-static void shell_process_get_property ( GObject *object,
-                                         guint property_id,
-                                         GValue *value,
-                                         GParamSpec *pspec ) 
-{
-  ShellProcess* self = SHELL_PROCESS(object);
-  switch (property_id) {
-  case PROP_ARGS:
-    g_value_set_boxed (value, self->priv->args);
-    break;
-  default:
-    G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-    break;
-  }
-}
-
-ShellProcess* shell_process_new(char **args)
-{
-  return (ShellProcess*) g_object_new(SHELL_TYPE_PROCESS,
-                                     "args", args,
-                                     NULL);
-}
-
-gboolean
-shell_process_run (ShellProcess *self,
-                  GError      **error)
-{
-  return g_spawn_async (NULL, self->priv->args, NULL,
-                       G_SPAWN_SEARCH_PATH, NULL, NULL,
-                       &self->priv->pid,
-                       error);
-}
-/*
-int
-shell_process_wait (ShellProcess *self)
-{
-  int status;
-
-  waitpid ((pid_t) self->priv->pid, &status, 0);
-
-  return status;
-}
-*/
diff --git a/src/shell-process.h b/src/shell-process.h
deleted file mode 100644 (file)
index ef6b2a8..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-#ifndef __SHELL_PROCESS_H__
-#define __SHELL_PROCESS_H__
-
-#include <glib-object.h>
-
-#define SHELL_TYPE_PROCESS                 (shell_process_get_type ())
-#define SHELL_PROCESS(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_PROCESS, ShellProcess))
-#define SHELL_PROCESS_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_PROCESS, ShellProcessClass))
-#define SHELL_IS_PROCESS(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_PROCESS))
-#define SHELL_IS_PROCESS_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_PROCESS))
-#define SHELL_PROCESS_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_PROCESS, ShellProcessClass))
-
-typedef struct _ShellProcess ShellProcess;
-typedef struct _ShellProcessClass ShellProcessClass;
-
-typedef struct _ShellProcessPrivate ShellProcessPrivate;
-
-struct _ShellProcess
-{
-  GObject parent;
-
-  ShellProcessPrivate *priv;
-};
-
-struct _ShellProcessClass
-{
-  GObjectClass parent_class;
-
-};
-
-GType shell_process_get_type (void) G_GNUC_CONST;
-ShellProcess* shell_process_new(char **args);
-
-gboolean shell_process_run (ShellProcess *process, GError **error);
-
-#endif /* __SHELL_PROCESS_H__ */